package com.heima.search.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.search.service.SearchHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jack
 * @data 2024 15:23
 */
@RestController
@RequestMapping("/api/v1/history")
public class SearchHistoryController {
    @Autowired
    private SearchHistoryService searchHistoryService;

    /**
     * 加载用户搜索历史记录
     *
     * @return
     */
    @PostMapping("load")
    public ResponseResult load(){
        return searchHistoryService.load();
    }
}
